home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / regnpckg.sit / Sticky Buttons / cards.xml < prev    next >
Text File  |  1990-12-10  |  56KB  |  1,089 lines

  1. card_3906.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>3906</id>
  6.     <filler1>0</filler1>
  7.     <cantDelete> <false /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <false /> </dontSearch>
  10.     <owner>3775</owner>
  11.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  12.     <content>
  13.         <layer>background</layer>
  14.         <id>2</id>
  15.         <text><span class="style7">eading This Stack</span><span class="style1"></span><span class="style13">┼╕</span><span class="style1">┬á┬á┬á┬á┬áLeave stack and go (back) to the stack ΓÇ£Start HereΓÇ¥</span><span class="style13">ΓÇ║</span><span class="style1">┬á┬á┬á┬á┬á Go to next page, if mouse button held down will keep turning┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áthe pages. Right arrow key is linked</span><span class="style13">∩¼ü</span><span class="style1">┬á┬á┬á┬á┬á┬áAs above, but previous page. Left arrow key is linked.</span><span class="style6">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áClick to Continue</span></text>
  16.     </content>
  17.     <name>Help</name>
  18.     <script>on mouseUpvisual effect barn door closego to first cdend mouseUpon arrowKeyend arrowKeyon doMenuend doMenuon chooseend choose</script>
  19. </card>
  20.  
  21.  
  22. card_4599.xml
  23. <?xml version="1.0" encoding="utf-8" ?>
  24. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  25. <card>
  26.     <id>4599</id>
  27.     <filler1>0</filler1>
  28.     <cantDelete> <false /> </cantDelete>
  29.     <showPict> <true /> </showPict>
  30.     <dontSearch> <false /> </dontSearch>
  31.     <owner>4644</owner>
  32.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  33.     <content>
  34.         <layer>background</layer>
  35.         <id>3</id>
  36.         <text>Page 20 of 20</text>
  37.     </content>
  38.     <content>
  39.         <layer>background</layer>
  40.         <id>9</id>
  41.         <text>Summary and Problems</text>
  42.     </content>
  43.     <content>
  44.         <layer>background</layer>
  45.         <id>2</id>
  46.         <text><span class="style1">e have presented a method for implementing ΓÇ£stickyΓÇ¥ buttons in HyperCard, based on the combination of the HyperCard v2 active text functions and special fonts. We have designed two fonts; Sticky Button and Sticky Monaco; to draw sticky buttons in Hypercard fields and scripts respectively. Finally we have written an XFCN, Xlate, to support the quick dispatch of sticky button events.</span><span class="style7">Problems</span><span class="style1">ΓÇó┬á┬áThe sticky buttons are noticably slower than real buttons, at least┬á┬á┬á┬á┬áon my Mac PlusΓǪΓÇó┬á┬áThe buttons only respond to </span><span class="style2">mouseUp</span><span class="style1">, no </span><span class="style2">mouseDown</span><span class="style1"> or</span><span class="style2">┬á┬á┬á┬á┬ámouseWithin</span><span class="style1"> etc.ΓÇó┬á┬áThe is a bug in HyperCards </span><span class="style2">clickText</span><span class="style1"> & </span><span class="style2">clickChunk</span><span class="style1"> functions. If┬á┬á┬á┬á┬áyou click in the right half of a single wide-character words then┬á┬á┬á┬áthey report a hit on the following inter-word gap. Wide is┬á┬á┬á┬árelative, this happens both with a Sticky Buttons ΓÇ£</span><span class="style13">Γé¼</span><span class="style1">ΓÇ¥ and ┬á┬á┬á┬áPalatino ΓÇ£wΓÇ¥ΓǪ</span></text>
  47.     </content>
  48.     <content>
  49.         <layer>background</layer>
  50.         <id>12</id>
  51.         <highlight> <true /> </highlight>
  52.     </content>
  53.     <name></name>
  54.     <script></script>
  55. </card>
  56.  
  57.  
  58. card_2542.xml
  59. <?xml version="1.0" encoding="utf-8" ?>
  60. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  61. <card>
  62.     <id>2542</id>
  63.     <filler1>0</filler1>
  64.     <cantDelete> <false /> </cantDelete>
  65.     <showPict> <true /> </showPict>
  66.     <dontSearch> <false /> </dontSearch>
  67.     <owner>4644</owner>
  68.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  69.     <part>
  70.         <id>1</id>
  71.         <type>field</type>
  72.         <visible> <true /> </visible>
  73.         <dontWrap> <false /> </dontWrap>
  74.         <dontSearch> <false /> </dontSearch>
  75.         <sharedText> <false /> </sharedText>
  76.         <fixedLineHeight> <false /> </fixedLineHeight>
  77.         <autoTab> <false /> </autoTab>
  78.         <lockText> <true /> </lockText>
  79.         <rect>
  80.             <left>5</left>
  81.             <top>182</top>
  82.             <right>412</right>
  83.             <bottom>201</bottom>
  84.         </rect>
  85.         <style>opaque</style>
  86.         <autoSelect> <false /> </autoSelect>
  87.         <showLines> <false /> </showLines>
  88.         <wideMargins> <false /> </wideMargins>
  89.         <multipleLines> <false /> </multipleLines>
  90.         <reservedFamily> 0 </reservedFamily>
  91.         <titleWidth>0</titleWidth>
  92.         <icon>0</icon>
  93.         <textAlign>center</textAlign>
  94.         <font>Palatino</font>
  95.         <textSize>14</textSize>
  96.         <textStyle>bold</textStyle>
  97.         <textHeight>18</textHeight>
  98.         <name>MsgId</name>
  99.         <script></script>
  100.     </part>
  101.     <content>
  102.         <layer>background</layer>
  103.         <id>3</id>
  104.         <text>Page 19 of 20</text>
  105.     </content>
  106.     <content>
  107.         <layer>background</layer>
  108.         <id>9</id>
  109.         <text>Demo of Dispatch Script</text>
  110.     </content>
  111.     <content>
  112.         <layer>background</layer>
  113.         <id>2</id>
  114.         <text><span class="style1">he slightly modified version of the dispatch script is installed in this card. Instead of send a message it just displays the message name at the bottom of the page. Try the buttons.</span><span class="style13">     </span><span class="style14"><a href="#" class="group">┬╖┬áPress┬áMe!┬áΓÇÜ</a></span><span class="style13">     </span><span class="style20"><a href="#" class="group">┬»┬áXlate┬á╧Ç┬á╦ÿ</a></span><span class="style13">      </span><span class="style41"><a href="#" class="group">├èSmooth┬áBitMaps</a></span><span class="style13"></span><span class="style42">                         </span><span class="style41"><a href="#" class="group">├ïUS┬áLetter</a></span><span class="style13">      </span><span class="style14"><a href="#" class="group">┬»┬áBang!*!┬á╦ÿ</a></span></text>
  115.     </content>
  116.     <name></name>
  117.     <script>on mouseUpif the short name of the target is "Text" then-- have we hit a button?put the textStyle of the clickChunk into stylif styl contains "group" then-- highlight buttonset the textStyle of the clickChunk to (styl & ",bold")-- generate message nameput Xlate(the clickText, Ident) into msg_name-- restore button-- send message to current card-- send msg_name to this cdput "Message generated:" && msg_name into cd fld "MsgId"set the textStyle of the clickChunk to stylend ifend ifend mouseUpon closeCardput empty into cd fld "MsgId"end closeCard</script>
  118. </card>
  119.  
  120.  
  121. card_2092.xml
  122. <?xml version="1.0" encoding="utf-8" ?>
  123. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  124. <card>
  125.     <id>2092</id>
  126.     <filler1>0</filler1>
  127.     <cantDelete> <false /> </cantDelete>
  128.     <showPict> <true /> </showPict>
  129.     <dontSearch> <false /> </dontSearch>
  130.     <owner>4644</owner>
  131.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  132.     <content>
  133.         <layer>background</layer>
  134.         <id>3</id>
  135.         <text>Page 18 of 20</text>
  136.     </content>
  137.     <content>
  138.         <layer>background</layer>
  139.         <id>9</id>
  140.         <text>The Message Dispatch Script</text>
  141.     </content>
  142.     <content>
  143.         <layer>background</layer>
  144.         <id>2</id>
  145.         <text><span class="style1">he following is a sample script to dispatch clicks on sticky buttons in a background field to handlers in the current </span><span class="style2">card</span><span class="style1">. It is based on the one used in the ΓÇ£RegionsΓÇ¥ stack. The Xlate XFCN is used to perform the mapping from sticky button name to message name.</span><span class="style45"></span><span class="style25">  on mouseUp    -- have we hit a button?    put the textStyle of the clickChunk into styl    if styl contains "group" then      -- highlight button      set the textStyle of the clickChunk to (styl & ",bold")      -- generate message name      put Xlate(the clickText, Ident) into msg_name      -- restore button      set the textStyle of the clickChunk to styl      -- send message to current card      do "send" && msg_name && "to this cd"    end if  end mouseUp</span></text>
  146.     </content>
  147.     <content>
  148.         <layer>background</layer>
  149.         <id>12</id>
  150.         <highlight> <true /> </highlight>
  151.     </content>
  152.     <name></name>
  153.     <script></script>
  154. </card>
  155.  
  156.  
  157. card_8909.xml
  158. <?xml version="1.0" encoding="utf-8" ?>
  159. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  160. <card>
  161.     <id>8909</id>
  162.     <filler1>0</filler1>
  163.     <cantDelete> <false /> </cantDelete>
  164.     <showPict> <true /> </showPict>
  165.     <dontSearch> <false /> </dontSearch>
  166.     <owner>4644</owner>
  167.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  168.     <content>
  169.         <layer>background</layer>
  170.         <id>3</id>
  171.         <text>Page 17 of 20</text>
  172.     </content>
  173.     <content>
  174.         <layer>background</layer>
  175.         <id>9</id>
  176.         <text>Standard Xtab Resources</text>
  177.     </content>
  178.     <content>
  179.         <layer>background</layer>
  180.         <id>2</id>
  181.         <text><span class="style1">here are four Xtab resources supplied:</span><span class="style6">LowerCase, UpperCase</span><span class="style1">┬á┬á┬á┬á┬áMaps all upper case characters to lower case and vice-versa.</span><span class="style6">Identifier</span><span class="style1">┬á┬á┬á┬á┬áMaps option-(, option-), option-<, option-> (Sticky Button font┬á┬á┬á┬á┬ábutton ends) and non-breaking space to _ (underscore). Maps all┬á┬á┬á┬á┬áother non-HyperTalk identifier characters to (in psuedo┬á┬á┬á┬á┬áHyperTalk):</span><span class="style25">┬á┬á┬á┬á┬á┬á┬áNumToChar((CharToNum(c) bitAnd 0x1F) bitOr 0x80)</span><span class="style1">┬á┬á┬á┬á┬áThat is, to an equivalent alphabetic character in the range 0x80 to┬á┬á┬á┬á┬á0x9F. This is the table used for sticky buttons.</span><span class="style6">None</span><span class="style1">┬á┬á┬á┬á┬áNull mapping table, supplied as a basis for building your own┬á┬á┬á┬á┬áusing ResEdit.</span></text>
  182.     </content>
  183.     <content>
  184.         <layer>background</layer>
  185.         <id>12</id>
  186.         <highlight> <true /> </highlight>
  187.     </content>
  188.     <name></name>
  189.     <script></script>
  190. </card>
  191.  
  192.  
  193. card_8529.xml
  194. <?xml version="1.0" encoding="utf-8" ?>
  195. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  196. <card>
  197.     <id>8529</id>
  198.     <filler1>0</filler1>
  199.     <cantDelete> <false /> </cantDelete>
  200.     <showPict> <true /> </showPict>
  201.     <dontSearch> <false /> </dontSearch>
  202.     <owner>4644</owner>
  203.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  204.     <content>
  205.         <layer>background</layer>
  206.         <id>3</id>
  207.         <text>Page 16 of 20</text>
  208.     </content>
  209.     <content>
  210.         <layer>background</layer>
  211.         <id>9</id>
  212.         <text><span class="style1">The </span><span class="style6">Xlate</span><span class="style1"> XFCN</span></text>
  213.     </content>
  214.     <content>
  215.         <layer>background</layer>
  216.         <id>2</id>
  217.         <text><span class="style1">he HyperTalk equivalent of Xlate is:</span><span class="style25">  function Xlate input,table    put empty into output    repeat with i = 1 to number of chars in input      put char CharToNum(char i of input) of table after output    end repeat    return output  end Xlate</span><span class="style1">Except that Xlate is a lot faster and the table comes from an Xtab resource.</span></text>
  218.     </content>
  219.     <name></name>
  220.     <script></script>
  221. </card>
  222.  
  223.  
  224. card_8357.xml
  225. <?xml version="1.0" encoding="utf-8" ?>
  226. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  227. <card>
  228.     <id>8357</id>
  229.     <filler1>0</filler1>
  230.     <cantDelete> <false /> </cantDelete>
  231.     <showPict> <true /> </showPict>
  232.     <dontSearch> <false /> </dontSearch>
  233.     <owner>4644</owner>
  234.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  235.     <content>
  236.         <layer>background</layer>
  237.         <id>3</id>
  238.         <text>Page 15 of 20</text>
  239.     </content>
  240.     <content>
  241.         <layer>background</layer>
  242.         <id>9</id>
  243.         <text><span class="style1">he </span><span class="style6">Xlate</span><span class="style1"> XFCN</span></text>
  244.     </content>
  245.     <content>
  246.         <layer>background</layer>
  247.         <id>2</id>
  248.         <text><span class="style1">ransliterating one string character for character to another using HyperTalk is rather slow, especially if many tests need to be made on each character. Xlate is a HyperCard external function which quickly transliterates a string using a named mapping table:</span><span class="style25">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áXlate(</span><span class="style2">input string</span><span class="style1">, </span><span class="style2">table name</span><span class="style25">)</span><span class="style1"> returns </span><span class="style2">string</span><span class="style1">The </span><span class="style2">input string</span><span class="style1"> may be any HyperTalk expression. The </span><span class="style2">table name</span><span class="style1"> is the name of a </span><span class="style2">Xtab</span><span class="style1"> resource which contains the translation table. An Xtab resource is simply any array of 256 bytes, byte </span><span class="style2">i</span><span class="style1"> containing the mapping for character number </span><span class="style2">i</span><span class="style1">.</span></text>
  249.     </content>
  250.     <name></name>
  251.     <script></script>
  252. </card>
  253.  
  254.  
  255. card_7999.xml
  256. <?xml version="1.0" encoding="utf-8" ?>
  257. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  258. <card>
  259.     <id>7999</id>
  260.     <filler1>0</filler1>
  261.     <cantDelete> <false /> </cantDelete>
  262.     <showPict> <true /> </showPict>
  263.     <dontSearch> <false /> </dontSearch>
  264.     <owner>4644</owner>
  265.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  266.     <content>
  267.         <layer>background</layer>
  268.         <id>3</id>
  269.         <text>Page 14 of 20</text>
  270.     </content>
  271.     <content>
  272.         <layer>background</layer>
  273.         <id>9</id>
  274.         <text>From Sticky Buttons To Messages</text>
  275.     </content>
  276.     <content>
  277.         <layer>background</layer>
  278.         <id>12</id>
  279.         <highlight> <true /> </highlight>
  280.     </content>
  281.     <content>
  282.         <layer>background</layer>
  283.         <id>2</id>
  284.         <text><span class="style1">hen there are multiple sticky buttons in a field the handler needs to determine which button was hit when a mouseUp occurs and dispatch to the appropriate action. There are two main ways to code this dispatch:ΓÇó┬á┬áUse a sequence of conditional statements to test whether the┬á┬á┬á┬á┬á</span><span class="style2">clickText</span><span class="style1">, which is the button name, is equal to or contains┬á┬á┬á┬á┬áanother string and then proceed accordingly. ΓÇó┬á┬áMap the </span><span class="style2">clickText</span><span class="style1"> to a message and dispatch using HyperTalks┬á┬á┬á┬á┬ásend command.The first method is used by the previous handlers in this stack, and is suitable where there are only a few possibilities. The second method is suitable where there a large number of possibilites, for example in a handler in a background field. However, the mapping from the </span><span class="style2">clickText</span><span class="style1"> to a suitable message name is non-trival as button names are typically not valid HyperTalk identifiers.The next few pages describe how to implement the second method of dispatch and start with the description of an XFCN designed to aid the mapping problem.</span></text>
  285.     </content>
  286.     <name></name>
  287.     <script></script>
  288. </card>
  289.  
  290.  
  291. card_7728.xml
  292. <?xml version="1.0" encoding="utf-8" ?>
  293. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  294. <card>
  295.     <id>7728</id>
  296.     <filler1>0</filler1>
  297.     <cantDelete> <false /> </cantDelete>
  298.     <showPict> <true /> </showPict>
  299.     <dontSearch> <false /> </dontSearch>
  300.     <owner>4644</owner>
  301.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  302.     <content>
  303.         <layer>background</layer>
  304.         <id>3</id>
  305.         <text>Page 13 of 20</text>
  306.     </content>
  307.     <content>
  308.         <layer>background</layer>
  309.         <id>9</id>
  310.         <text>Multiple Sticky Buttons</text>
  311.     </content>
  312.     <content>
  313.         <layer>background</layer>
  314.         <id>2</id>
  315.         <text><span class="style1">f there are multiple sticky buttons in a field the </span><span class="style2">mouseUp</span><span class="style1"> handler has to distinguish between them by examining the </span><span class="style2">clickText</span><span class="style1">. The usual font used by the Script Editor is Monaco, which does not of course have the special characters which exist in Sticky Buttons, this makes typing the titles of sticky buttons as HyperTalk strings a little difficult, and rather error prone! To solve this problem a second font is provided, ΓÇ£Sticky MonacoΓÇ¥, which may be set as the Script Editor font by setting </span><span class="style2">scriptTextFont</span><span class="style1">.Try these to see the difference: </span><span class="style14"><a href="#" class="group">┬»┬áEdit┬á╧Ç┬á╦ÿ</a></span><span class="style1"> and </span><span class="style14"><a href="#" class="group">┬»┬áSticky┬áEdit┬á╧Ç┬á╦ÿ</a></span><span class="style1">.</span></text>
  316.     </content>
  317.     <name></name>
  318.     <script>-- hit Enter to continueon mouseUp-- make sure we're in the right fieldif the short name of the target is not "Text" thenexit mouseUpend ifput the textStyle of the clickChunk into styl-- check we hit a buttonif "group" is not in styl then exit mouseUp-- got the button, highlightset the textStyle of the clickChunk to (styl & ",bold")-- determine actionif the clickText is "┬»┬áEdit┬á╧Ç┬á╦ÿ" thenedit the script of meelse if the clickText is "┬»┬áSticky┬áEdit┬á╧Ç┬á╦ÿ" thenput the scriptTextFont into origset the scriptTextFont to "Sticky Monaco"edit the script of meset the scriptTextFont to origend if-- un-highlight the buttonset the textStyle of the clickChunk to stylend mouseUp</script>
  319. </card>
  320.  
  321.  
  322. card_7516.xml
  323. <?xml version="1.0" encoding="utf-8" ?>
  324. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  325. <card>
  326.     <id>7516</id>
  327.     <filler1>0</filler1>
  328.     <cantDelete> <false /> </cantDelete>
  329.     <showPict> <true /> </showPict>
  330.     <dontSearch> <false /> </dontSearch>
  331.     <owner>4644</owner>
  332.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  333.     <content>
  334.         <layer>background</layer>
  335.         <id>3</id>
  336.         <text>Page 12 of 20</text>
  337.     </content>
  338.     <content>
  339.         <layer>background</layer>
  340.         <id>2</id>
  341.         <text><span class="style1">he following handler is a simple example of sticky buttons, it handles one button only and plays a tune just like the button on the Introduction card:</span><span class="style25">on mouseUp  -- make sure we're in the right field  if the short name of the target is not "Text" then    exit mouseUp  end if    put the textStyle of the clickChunk into styl    -- check we hit a button  if "group" is not in styl then exit mouseUp    -- got the button, highlight  set the textStyle of the clickChunk to (styl & ",bold")    -- perform action  playTune  -- un-highlight the button  set the textStyle of the clickChunk to stylend mouseUp</span><span class="style1">This handler is in the card script and not the field script, the filed in is in the background and shared by most of the cards in this stack, each if which has its own </span><span class="style2">mouseUp</span><span class="style1"> handler.To try this script press: </span><span class="style14"><a href="#" class="group">┬╖┬áPlay┬áTune┬áΓÇÜ</a></span><span class="style1"> (you can safely type</span><span class="style13"> </span><span class="style42">├¢-</span><span class="style12">.</span><span class="style1"> once the button has un-highlighted).</span></text>
  342.     </content>
  343.     <content>
  344.         <layer>background</layer>
  345.         <id>9</id>
  346.         <text>A Simple Example</text>
  347.     </content>
  348.     <content>
  349.         <layer>background</layer>
  350.         <id>12</id>
  351.         <highlight> <true /> </highlight>
  352.     </content>
  353.     <name></name>
  354.     <script>on mouseUp-- make sure we're in the right fieldif the short name of the target is not "Text" thenexit mouseUpend ifput the textStyle of the clickChunk into styl-- check we hit a buttonif "group" is not in styl then exit mouseUp-- got the button, highlightset the textStyle of the clickChunk to (styl & ",bold")-- perform actionplayTune-- un-highlight the buttonset the textStyle of the clickChunk to stylend mouseUp</script>
  355. </card>
  356.  
  357.  
  358. card_7330.xml
  359. <?xml version="1.0" encoding="utf-8" ?>
  360. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  361. <card>
  362.     <id>7330</id>
  363.     <filler1>0</filler1>
  364.     <cantDelete> <false /> </cantDelete>
  365.     <showPict> <true /> </showPict>
  366.     <dontSearch> <false /> </dontSearch>
  367.     <owner>4644</owner>
  368.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  369.     <content>
  370.         <layer>background</layer>
  371.         <id>3</id>
  372.         <text>Page 11 of 20</text>
  373.     </content>
  374.     <content>
  375.         <layer>background</layer>
  376.         <id>9</id>
  377.         <text>Building a Sticky Button</text>
  378.     </content>
  379.     <content>
  380.         <layer>background</layer>
  381.         <id>2</id>
  382.         <text><span class="style1">)┬á┬áType the button using the Sticky Buttons font and group style.┬á┬á┬á┬á┬áFor plain rectangular buttons add italic style, for check-boxes and┬á┬á┬á┬á┬áradio buttons add underline style.2)┬á┬áWrite a </span><span class="style2">mouseUp</span><span class="style1"> handler in the field to detect a mouse click┬á┬á┬á┬á┬áand perform the appropriate action. The handler cannot be a</span><span class="style2">┬á┬á┬á┬á┬ámouseDown</span><span class="style1"> one as </span><span class="style2">clickText</span><span class="style1"> & </span><span class="style2">clickChunk</span><span class="style1"> are not set until┬á┬á┬á┬á┬ámouse up. The handler may be further down the inheritence┬á┬á┬á┬á┬áchain, but then the handler should check </span><span class="style2">the target</span><span class="style1">.3)┬á┬áThe first action the handler should take is to check that the┬á┬á┬á┬á┬á</span><span class="style2">textStyle</span><span class="style1"> of the </span><span class="style2">clickChunk</span><span class="style1"> contains group and exit if not. If you┬á┬á┬á┬á┬áhave other grouped but non-button text in your field your┬á┬á┬á┬á┬áshould also check the </span><span class="style2">textFont</span><span class="style1"> and take the appropriate action if┬á┬á┬á┬á┬áit is not Sticky Buttons.</span></text>
  383.     </content>
  384.     <content>
  385.         <layer>background</layer>
  386.         <id>12</id>
  387.         <highlight> <true /> </highlight>
  388.     </content>
  389.     <name></name>
  390.     <script></script>
  391. </card>
  392.  
  393.  
  394. card_7151.xml
  395. <?xml version="1.0" encoding="utf-8" ?>
  396. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  397. <card>
  398.     <id>7151</id>
  399.     <filler1>0</filler1>
  400.     <cantDelete> <false /> </cantDelete>
  401.     <showPict> <true /> </showPict>
  402.     <dontSearch> <false /> </dontSearch>
  403.     <owner>4644</owner>
  404.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  405.     <content>
  406.         <layer>background</layer>
  407.         <id>3</id>
  408.         <text>Page 10 of 20</text>
  409.     </content>
  410.     <content>
  411.         <layer>background</layer>
  412.         <id>9</id>
  413.         <text>The Sticky Buttons Characters</text>
  414.     </content>
  415.     <content>
  416.         <layer>background</layer>
  417.         <id>2</id>
  418.         <text><span class="style1">he Sticky Buttons font contains of the following characters:</span><span class="style7">Standard Characters:</span><span class="style1"> </span><span class="style13">a</span><span class="style1"> ΓÇô </span><span class="style13">z</span><span class="style1">, </span><span class="style13">A</span><span class="style1"> ΓÇô </span><span class="style13">Z</span><span class="style1">, </span><span class="style13">1</span><span class="style1"> ΓÇô </span><span class="style13">9</span><span class="style1">,</span><span class="style7">  etc.</span><span class="style1">┬á┬á┬á┬á┬áAll the standard Chicago font characters are present. To make them easier to enter the four special symbols; </span><span class="style13">∩ú┐</span><span class="style1">, </span><span class="style13">├Æ</span><span class="style1">, </span><span class="style13">├Ü</span><span class="style1"> & </span><span class="style13">├¢</span><span class="style1">; are also duplicated as option-K, option-L, option-: and option-Z respectively. These characters change their appearance according to the style; for example </span><span class="style13">A</span><span class="style1"> for plain, </span><span class="style32">A</span><span class="style1"> for italic, </span><span class="style38">A</span><span class="style1"> for bold & bold italic, and </span><span class="style42">A</span><span class="style1"> for underline.</span><span class="style7">Non-Breaking Space: </span><span class="style13">┬á</span><span class="style1">┬á┬á┬á┬áWhen drawing text, the Macintosh </span><span class="style2">does not </span><span class="style1">use the space character from a font but rather just paints a blank space. Therefore to obtain spaces in buttons you must use the non-breaking space, option-space which is taken from the font. For example; using spaces you will get </span><span class="style13">┬╖ Go Home ΓÇÜ</span><span class="style1"> instead of </span><span class="style13">┬╖┬áGo┬áHome┬áΓÇÜ</span><span class="style1">.</span><span class="style7">Button Ends: </span><span class="style13">┬╖</span><span class="style1">, </span><span class="style13">ΓÇÜ</span><span class="style1">, </span><span class="style13">┬»</span><span class="style1">, </span><span class="style13">╦ÿ</span><span class="style1">┬á┬á┬á┬á┬áThese characters are option-(, option-), option-< and option-> respectively. They all change their appearance correctly according to the style. These characters are narrower than the standard HyperCard button ends and should normally be combined with a non-breaking space. For example; using non-breaking spaces gives </span><span class="style13">┬╖┬áCancel┬áΓÇÜ</span><span class="style1">, not using them gives </span><span class="style13">┬╖CancelΓÇÜ</span><span class="style1">. Note: italic option-( & option-) produce plain round rectangle ends, a style not provided by HyperCard.</span><span class="style7">Check-boxes and Radio Buttons: </span><span class="style13">├è</span><span class="style1">, </span><span class="style13">├ï</span><span class="style1">┬á┬á┬á┬á┬áThese characters are option-Tand option-U respectively. Unlike the button end characters, these incoporate the correct amount of white-space, so the first character of the title should follow immediately. In bold underline style they draw as the highlighted versions; </span><span class="style43">├è</span><span class="style1"> and </span><span class="style43">├ï</span><span class="style1">.</span><span class="style7">Icons:</span><span class="style1">┬á┬á┬á┬á┬áThe following icons are provided by Sticky Buttons:┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áoption-~┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á</span><span class="style13">┼╕</span><span class="style1">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áoption-!┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á</span><span class="style13">Γüä</span><span class="style1">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áoption-@┬á┬á┬á┬á┬á┬á┬á┬á┬á</span><span class="style13">Γé¼</span><span class="style1">┬á┬á┬á┬á┬á┬á┬áoption-┬ú┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á</span><span class="style13">ΓÇ╣</span><span class="style1">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áoption-$┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á</span><span class="style13">ΓÇ║</span><span class="style1">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áoption-%┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á</span><span class="style13">∩¼ü</span><span class="style1">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áoption-^┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á</span><span class="style13">∩¼é</span><span class="style1">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áoption-&┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á</span><span class="style13">ΓÇí</span><span class="style1">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áoption-W┬á┬á┬á┬á┬á┬á</span><span class="style13">ΓÇ₧</span><span class="style1">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áoption-E┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á</span><span class="style13">ΓÇ░</span><span class="style1">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áoption-R┬á┬á┬á┬á┬á┬á┬á┬á┬á</span><span class="style13">├é</span><span class="style1">┬á┬áInternational Note: option-@, option-┬ú and option-$ are option-shift-2, option-shift-3 and option-shift-4 respectively.</span></text>
  419.     </content>
  420.     <content>
  421.         <layer>background</layer>
  422.         <id>12</id>
  423.         <highlight> <true /> </highlight>
  424.     </content>
  425.     <name></name>
  426.     <script></script>
  427. </card>
  428.  
  429.  
  430. card_5952.xml
  431. <?xml version="1.0" encoding="utf-8" ?>
  432. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  433. <card>
  434.     <id>5952</id>
  435.     <filler1>0</filler1>
  436.     <cantDelete> <false /> </cantDelete>
  437.     <showPict> <true /> </showPict>
  438.     <dontSearch> <false /> </dontSearch>
  439.     <owner>4644</owner>
  440.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  441.     <content>
  442.         <layer>background</layer>
  443.         <id>3</id>
  444.         <text>Page 9 of 20</text>
  445.     </content>
  446.     <content>
  447.         <layer>background</layer>
  448.         <id>2</id>
  449.         <text><span class="style1">he underline style draws </span><span class="style41"><a href="#" class="group">├èCheck┬áBox</a></span><span class="style1"> and </span><span class="style41"><a href="#" class="group">├ïRadio┬áButton</a></span><span class="style1"> button styles. Also included in the font are some useful icons, for example </span><span class="style14"><a href="#" class="group">Γüä</a></span><span class="style1"> and </span><span class="style14"><a href="#" class="group">┼╕</a></span><span class="style1">.</span></text>
  450.     </content>
  451.     <content>
  452.         <layer>background</layer>
  453.         <id>9</id>
  454.         <text>ΓǪThe Sticky Buttons Font</text>
  455.     </content>
  456.     <name></name>
  457.     <script>on mouseUpflashButtonend mouseUp</script>
  458. </card>
  459.  
  460.  
  461. card_6226.xml
  462. <?xml version="1.0" encoding="utf-8" ?>
  463. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  464. <card>
  465.     <id>6226</id>
  466.     <filler1>0</filler1>
  467.     <cantDelete> <false /> </cantDelete>
  468.     <showPict> <true /> </showPict>
  469.     <dontSearch> <false /> </dontSearch>
  470.     <owner>4644</owner>
  471.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  472.     <content>
  473.         <layer>background</layer>
  474.         <id>3</id>
  475.         <text>Page 8 of 20</text>
  476.     </content>
  477.     <content>
  478.         <layer>background</layer>
  479.         <id>9</id>
  480.         <text>The Sticky Buttons Font</text>
  481.     </content>
  482.     <content>
  483.         <layer>background</layer>
  484.         <id>2</id>
  485.         <text><span class="style1">Sticky ButtonsΓÇ¥ is a </span><span class="style2">styled</span><span class="style1"> font; consisting of plain, bold, italic, bold italic, underline and bold underline members; which we have designed to draw HyperCard style buttons. The plain style draws </span><span class="style14"><a href="#" class="group">┬»┬áShadow┬á╦ÿ</a></span><span class="style1"> and </span><span class="style14"><a href="#" class="group">┬╖┬áRound┬áRectangle┬áΓÇÜ</a></span><span class="style1"> button styles. The italic style draws the </span><span class="style20"><a href="#" class="group">┬»┬áRectangle┬á╦ÿ</a></span><span class="style1"> button style. Highlighted buttons are drawn with the bold styles; plain bold for </span><span class="style21"><a href="#" class="group">┬»┬áShadow┬á╦ÿ</a></span><span class="style1"> & </span><span class="style21"><a href="#" class="group">┬╖┬áRound┬áRectangle┬áΓÇÜ</a></span><span class="style1"> and italic bold for </span><span class="style22"><a href="#" class="group">┬»┬áRectangle┬á╦ÿ</a></span><span class="style1">. </span></text>
  486.     </content>
  487.     <name></name>
  488.     <script>on mouseUpflashButtonend mouseUp</script>
  489. </card>
  490.  
  491.  
  492. card_6774.xml
  493. <?xml version="1.0" encoding="utf-8" ?>
  494. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  495. <card>
  496.     <id>6774</id>
  497.     <filler1>0</filler1>
  498.     <cantDelete> <false /> </cantDelete>
  499.     <showPict> <true /> </showPict>
  500.     <dontSearch> <false /> </dontSearch>
  501.     <owner>4644</owner>
  502.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  503.     <content>
  504.         <layer>background</layer>
  505.         <id>3</id>
  506.         <text>Page 7 of 20</text>
  507.     </content>
  508.     <content>
  509.         <layer>background</layer>
  510.         <id>9</id>
  511.         <text>From Active Text to Sticky Buttons</text>
  512.     </content>
  513.     <content>
  514.         <layer>background</layer>
  515.         <id>2</id>
  516.         <text>Sticky buttons combine the property of ΓÇ£stickinessΓÇ¥ with that of the button metaphor. Active text provides the stickiness property but only supports half of the button metaphor; that of an action being initiated by a mouse click. However, active text neither looks like buttons or highlights like them, if this could be achieved then we would have sticky buttons.┬á┬á┬á┬á┬áActive text could be made to look like HyperCard buttons by using a special font in a similar way to Mike Horton's ΓÇ£Chicago SuburbsΓÇ¥ fonts which enable Macintosh buttons to be typed into documents. However, such simple text ΓÇ£buttonsΓÇ¥ would look wrong if highlighted as text & button highlighting are not the same.</text>
  517.     </content>
  518.     <name></name>
  519.     <script></script>
  520. </card>
  521.  
  522.  
  523. card_5798.xml
  524. <?xml version="1.0" encoding="utf-8" ?>
  525. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  526. <card>
  527.     <id>5798</id>
  528.     <filler1>0</filler1>
  529.     <cantDelete> <false /> </cantDelete>
  530.     <showPict> <true /> </showPict>
  531.     <dontSearch> <false /> </dontSearch>
  532.     <owner>4644</owner>
  533.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  534.     <part>
  535.         <id>1</id>
  536.         <type>field</type>
  537.         <visible> <true /> </visible>
  538.         <dontWrap> <false /> </dontWrap>
  539.         <dontSearch> <false /> </dontSearch>
  540.         <sharedText> <false /> </sharedText>
  541.         <fixedLineHeight> <false /> </fixedLineHeight>
  542.         <autoTab> <false /> </autoTab>
  543.         <lockText> <false /> </lockText>
  544.         <rect>
  545.             <left>5</left>
  546.             <top>205</top>
  547.             <right>392</right>
  548.             <bottom>219</bottom>
  549.         </rect>
  550.         <style>opaque</style>
  551.         <autoSelect> <false /> </autoSelect>
  552.         <showLines> <false /> </showLines>
  553.         <wideMargins> <false /> </wideMargins>
  554.         <multipleLines> <false /> </multipleLines>
  555.         <reservedFamily> 0 </reservedFamily>
  556.         <titleWidth>0</titleWidth>
  557.         <icon>0</icon>
  558.         <textAlign>left</textAlign>
  559.         <font>Palatino</font>
  560.         <textSize>10</textSize>
  561.         <textStyle>plain</textStyle>
  562.         <textHeight>13</textHeight>
  563.         <name>Footnote</name>
  564.         <script></script>
  565.     </part>
  566.     <part>
  567.         <id>2</id>
  568.         <type>field</type>
  569.         <visible> <false /> </visible>
  570.         <dontWrap> <false /> </dontWrap>
  571.         <dontSearch> <false /> </dontSearch>
  572.         <sharedText> <false /> </sharedText>
  573.         <fixedLineHeight> <false /> </fixedLineHeight>
  574.         <autoTab> <false /> </autoTab>
  575.         <lockText> <true /> </lockText>
  576.         <rect>
  577.             <left>25</left>
  578.             <top>62</top>
  579.             <right>226</right>
  580.             <bottom>108</bottom>
  581.         </rect>
  582.         <style>shadow</style>
  583.         <autoSelect> <false /> </autoSelect>
  584.         <showLines> <false /> </showLines>
  585.         <wideMargins> <false /> </wideMargins>
  586.         <multipleLines> <false /> </multipleLines>
  587.         <reservedFamily> 0 </reservedFamily>
  588.         <titleWidth>0</titleWidth>
  589.         <icon>0</icon>
  590.         <textAlign>left</textAlign>
  591.         <font>Geneva</font>
  592.         <textSize>12</textSize>
  593.         <textStyle>plain</textStyle>
  594.         <textHeight>16</textHeight>
  595.         <name>clickText</name>
  596.         <script></script>
  597.     </part>
  598.     <part>
  599.         <id>3</id>
  600.         <type>field</type>
  601.         <visible> <false /> </visible>
  602.         <dontWrap> <false /> </dontWrap>
  603.         <dontSearch> <false /> </dontSearch>
  604.         <sharedText> <false /> </sharedText>
  605.         <fixedLineHeight> <false /> </fixedLineHeight>
  606.         <autoTab> <false /> </autoTab>
  607.         <lockText> <true /> </lockText>
  608.         <rect>
  609.             <left>163</left>
  610.             <top>62</top>
  611.             <right>354</right>
  612.             <bottom>121</bottom>
  613.         </rect>
  614.         <style>shadow</style>
  615.         <autoSelect> <false /> </autoSelect>
  616.         <showLines> <false /> </showLines>
  617.         <wideMargins> <false /> </wideMargins>
  618.         <multipleLines> <false /> </multipleLines>
  619.         <reservedFamily> 0 </reservedFamily>
  620.         <titleWidth>0</titleWidth>
  621.         <icon>0</icon>
  622.         <textAlign>left</textAlign>
  623.         <font>Geneva</font>
  624.         <textSize>12</textSize>
  625.         <textStyle>plain</textStyle>
  626.         <textHeight>16</textHeight>
  627.         <name>clickChunk</name>
  628.         <script></script>
  629.     </part>
  630.     <part>
  631.         <id>4</id>
  632.         <type>button</type>
  633.         <visible> <true /> </visible>
  634.         <reserved5> 0 </reserved5>
  635.         <reserved4> 0 </reserved4>
  636.         <reserved3> 0 </reserved3>
  637.         <reserved2> 0 </reserved2>
  638.         <reserved1> 0 </reserved1>
  639.         <enabled> <true /> </enabled>
  640.         <rect>
  641.             <left>157</left>
  642.             <top>182</top>
  643.             <right>257</right>
  644.             <bottom>204</bottom>
  645.         </rect>
  646.         <style>roundrect</style>
  647.         <showName> <true /> </showName>
  648.         <highlight> <false /> </highlight>
  649.         <autoHighlight> <true /> </autoHighlight>
  650.         <sharedHighlight> <true /> </sharedHighlight>
  651.         <family>0</family>
  652.         <titleWidth>0</titleWidth>
  653.         <icon>0</icon>
  654.         <textAlign>center</textAlign>
  655.         <font>Chicago</font>
  656.         <textSize>12</textSize>
  657.         <textStyle>plain</textStyle>
  658.         <name>Peek Script</name>
  659.         <script>on mouseUpif not editScript("the script of this cd", "Peek of Active Text Script", "get 1") thenanswer "Sorry, not enough memory"end ifend mouseUp</script>
  660.     </part>
  661.     <content>
  662.         <layer>background</layer>
  663.         <id>3</id>
  664.         <text>Page 6 of 20</text>
  665.     </content>
  666.     <content>
  667.         <layer>background</layer>
  668.         <id>9</id>
  669.         <text>Active Text: Example Page</text>
  670.     </content>
  671.     <content>
  672.         <layer>background</layer>
  673.         <id>2</id>
  674.         <text><span class="style1">he functions </span><span class="style2">clickText</span><span class="style1"> & </span><span class="style2">clickChunk</span><span class="style1"> and the group text style together allow the implementation of </span><span class="style27"><a href="#" class="group">flexible*</a></span><span class="style1"> active text. As an example of this flexibilty words on this page in italics have a popup defintion linked to them and those with </span><span class="style27"><a href="#" class="group">superscripts</a></span><span class="style29"><a href="#" class="group">ΓÇá</a></span><span class="style1"> have ΓÇ£footnotesΓÇ¥ attached which appear at the bottom of the page. Active text does not suffer the drawbacks of buttons pasted over text; the text can be edited or scrolled without undesirable results.</span></text>
  675.     </content>
  676.     <content>
  677.         <layer>card</layer>
  678.         <id>2</id>
  679.         <text><span class="style31">he clickText returns the word the reader click on. Can be used to implement ΓÇ£active textΓÇÖ.</span></text>
  680.     </content>
  681.     <content>
  682.         <layer>card</layer>
  683.         <id>3</id>
  684.         <text><span class="style31">he clickChunk returns a chunk expression (a range of characters, not word number) for the word the reader clicked on.</span></text>
  685.     </content>
  686.     <name></name>
  687.     <script>on mouseUpif the short name of the target is not "Text" then exit mouseUpput the clickText into txtput the textStyle of the clickChunk into stylif styl contains "italic" thendoDef txtelse if styl contains "group" thendoFoot txtend ifend mouseUpon doDef txtselect the clickChunklock screenshow cd fld txtunlock screen with barn door open fastwait 30lock screenhide cd fld txtunlock screen with barn door close fastend doDefon doFoot txtget "missing footnote"if txt is "superscriptsΓÇá" thenget "ΓÇálike this one"else if txt is "flexible*" thenget "*but not flexible enoughΓǪ"else if txt contains "sticky buttons" thenget "Γé¼the point of all this!"end ifput it into cd fld "Footnote"end doFooton closeCardput empty into cd fld "Footnote"pass closeCardend closeCard</script>
  688. </card>
  689.  
  690.  
  691. card_5072.xml
  692. <?xml version="1.0" encoding="utf-8" ?>
  693. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  694. <card>
  695.     <id>5072</id>
  696.     <filler1>0</filler1>
  697.     <cantDelete> <false /> </cantDelete>
  698.     <showPict> <true /> </showPict>
  699.     <dontSearch> <false /> </dontSearch>
  700.     <owner>4644</owner>
  701.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  702.     <part>
  703.         <id>1</id>
  704.         <type>button</type>
  705.         <visible> <true /> </visible>
  706.         <reserved5> 0 </reserved5>
  707.         <reserved4> 0 </reserved4>
  708.         <reserved3> 0 </reserved3>
  709.         <reserved2> 0 </reserved2>
  710.         <reserved1> 0 </reserved1>
  711.         <enabled> <true /> </enabled>
  712.         <rect>
  713.             <left>125</left>
  714.             <top>204</top>
  715.             <right>279</right>
  716.             <bottom>221</bottom>
  717.         </rect>
  718.         <style>checkbox</style>
  719.         <showName> <true /> </showName>
  720.         <highlight> <false /> </highlight>
  721.         <autoHighlight> <true /> </autoHighlight>
  722.         <sharedHighlight> <true /> </sharedHighlight>
  723.         <family>0</family>
  724.         <titleWidth>0</titleWidth>
  725.         <icon>0</icon>
  726.         <textAlign>center</textAlign>
  727.         <font>Palatino</font>
  728.         <textSize>12</textSize>
  729.         <textStyle>plain</textStyle>
  730.         <name>Highlight Grouped Text</name>
  731.         <script>on mouseUpif the hilite of me then show groupselse hide groupsend mouseUp</script>
  732.     </part>
  733.     <content>
  734.         <layer>background</layer>
  735.         <id>3</id>
  736.         <text>Page 5 of 20</text>
  737.     </content>
  738.     <content>
  739.         <layer>background</layer>
  740.         <id>2</id>
  741.         <text><span class="style1">n </span><span class="style27"><a href="#" class="group">HyperCard 2</a></span><span class="style1"> multiple fonts and styles may be used within a single field. In addition to the usual styles a new style </span><span class="style2">group</span><span class="style1"> is added which groups runs of characters together. Grouped character runs appear as a single word to </span><span class="style27"><a href="#" class="group">the </a></span><span class="style28"><a href="#" class="group">clickText</a></span><span class="style27"><a href="#" class="group"> function</a></span><span class="style1">. Group style operates in the same way as other text styles and may be combined with them. The group style allows both multiple words to be combined as a single piece of active text and easy definition of which parts of a text should be active. The follo</span><span class="style27"><a href="#" class="group">wing script</a></span><span class="style1">, which is installed on this page, demonstrates this:</span><span class="style25">  on mouseUp    if the textStyle of the clickChunk contains "group" then      answer "You clicked the group" && quote & clickText ┬¼             & quote    end if  end mouseUp</span><span class="style1">Unlike the other text styles group normally has no visible effect on the text. The HyperTalk command </span><span class="style28"><a href="#" class="group">show groups</a></span><span class="style1"> highlights grouped text by drawing a gray line underneath it, the command </span><span class="style28"><a href="#" class="group">hide groups</a></span><span class="style1"> removes the highlighting. The button below toggles the visibility of grouped text on this page.</span></text>
  742.     </content>
  743.     <content>
  744.         <layer>background</layer>
  745.         <id>12</id>
  746.         <highlight> <true /> </highlight>
  747.     </content>
  748.     <content>
  749.         <layer>background</layer>
  750.         <id>9</id>
  751.         <text><span class="style1">ctive Text: The </span><span class="style6">group</span><span class="style1"> text style</span></text>
  752.     </content>
  753.     <name></name>
  754.     <script>on mouseUpif the short name of the target is not "Text" then pass mouseUpif the textStyle of the clickChunk contains "group" thenanswer "You clicked" && quote & the clickText & quoteend ifend mouseUpon closeCardif the hilite of btn "Highlight Grouped Text" thenclick at the loc of btn "Highlight Grouped Text"end ifpass closeCardend closeCard</script>
  755. </card>
  756.  
  757.  
  758. card_2868.xml
  759. <?xml version="1.0" encoding="utf-8" ?>
  760. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  761. <card>
  762.     <id>2868</id>
  763.     <filler1>0</filler1>
  764.     <cantDelete> <false /> </cantDelete>
  765.     <showPict> <true /> </showPict>
  766.     <dontSearch> <false /> </dontSearch>
  767.     <owner>4644</owner>
  768.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  769.     <content>
  770.         <layer>background</layer>
  771.         <id>3</id>
  772.         <text>Page 4 of 20</text>
  773.     </content>
  774.     <content>
  775.         <layer>background</layer>
  776.         <id>9</id>
  777.         <text><span class="style1">ctive Text: The click</span><span class="style6">x</span><span class="style1"> Functions</span></text>
  778.     </content>
  779.     <content>
  780.         <layer>background</layer>
  781.         <id>2</id>
  782.         <text><span class="style2">lickText</span><span class="style1"> and </span><span class="style2">clickChunk</span><span class="style1"> are two functions which return the word in a field the reader clicked on and a </span><span class="style2">chunk expression</span><span class="style1"> describing that word respectively. As an example the script of this page responds to mouse clicks by calling these functions and displaying the results in a dialog. The script which performs this is:</span><span class="style25">  on mouseUp    answer "You clicked" && quote & the clickText & quote && ┬¼           "which is" && the clickChunk  end mouseUp</span><span class="style1">Note that HyperCard takes the defintion of a </span><span class="style2">word</span><span class="style1"> literally when evaluating the clickText function; clicking on punctuation or other symbols will return an empty string. However, if you click on a non-word character then the clickChunk will still return a valid chunk expression for it.</span></text>
  783.     </content>
  784.     <content>
  785.         <layer>background</layer>
  786.         <id>12</id>
  787.         <highlight> <true /> </highlight>
  788.     </content>
  789.     <name></name>
  790.     <script>on mouseUpif the short name of the target is not "Text" then pass mouseUpanswer "You clicked" && quote & the clickText & quote && "which is" ┬¼&& the clickChunkend mouseUp</script>
  791. </card>
  792.  
  793.  
  794. card_6652.xml
  795. <?xml version="1.0" encoding="utf-8" ?>
  796. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  797. <card>
  798.     <id>6652</id>
  799.     <filler1>0</filler1>
  800.     <cantDelete> <false /> </cantDelete>
  801.     <showPict> <true /> </showPict>
  802.     <dontSearch> <false /> </dontSearch>
  803.     <owner>4644</owner>
  804.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  805.     <content>
  806.         <layer>background</layer>
  807.         <id>3</id>
  808.         <text>Page 3 of 20</text>
  809.     </content>
  810.     <content>
  811.         <layer>background</layer>
  812.         <id>9</id>
  813.         <text><span class="style6">ctive Text</span><span class="style1"> in HyperCard v2</span></text>
  814.     </content>
  815.     <content>
  816.         <layer>background</layer>
  817.         <id>2</id>
  818.         <text><span class="style1">ur method for sticky buttons is built upon the new </span><span class="style2">active text</span><span class="style1"> features introduced in HyperCard version 2. Active text is text which is capable of responding to actions by the reader, such as clicking on the text with a pointing device. In HyperCard version 2 three functions; </span><span class="style2">clickText</span><span class="style1">, </span><span class="style2">clickChunk</span><span class="style1"> & </span><span class="style2">clickLine</span><span class="style1">; and a new text style </span><span class="style28"><a href="#" class="group">group</a></span><span class="style1"> have been introduced to facilitate the construction of active text in fields. We start be describing these new features.</span></text>
  819.     </content>
  820.     <name></name>
  821.     <script></script>
  822. </card>
  823.  
  824.  
  825. card_9675.xml
  826. <?xml version="1.0" encoding="utf-8" ?>
  827. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  828. <card>
  829.     <id>9675</id>
  830.     <filler1>0</filler1>
  831.     <cantDelete> <false /> </cantDelete>
  832.     <showPict> <true /> </showPict>
  833.     <dontSearch> <false /> </dontSearch>
  834.     <owner>4644</owner>
  835.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  836.     <content>
  837.         <layer>background</layer>
  838.         <id>3</id>
  839.         <text>Page 2 of 20</text>
  840.     </content>
  841.     <content>
  842.         <layer>background</layer>
  843.         <id>9</id>
  844.         <text>ΓǪIntroduction</text>
  845.     </content>
  846.     <content>
  847.         <layer>background</layer>
  848.         <id>12</id>
  849.         <highlight> <true /> </highlight>
  850.     </content>
  851.     <content>
  852.         <layer>background</layer>
  853.         <id>2</id>
  854.         <text><span class="style7">cknowledgements</span><span class="style1">Thanks to two of the ├ƒeta testers of the Region Package, Ruben Leon & Olle Furburg, whose enthusiastic reaction to an earlier version of Sticky Buttons spurred me on to finish the job and do them properly. The public domain ΓÇ£Chicago SuburbsΓÇ¥ fonts by Mike Horton, which were designed to allow the representation of  standard Macintosh buttons & menus in documents, gave me the original idea to build sticky buttons for HyperCard.</span><span class="style7">Copyright</span><span class="style1">The fonts in this stack, ΓÇ£Sticky ButtonsΓÇ¥ and ΓÇ£Sticky MonacoΓÇ¥, are placed in the public domain. The code resources, ΓÇ£editScriptΓÇ¥ and ΓÇ£XlateΓÇ¥ are ┬⌐ 1990, Nigel Perry. They are free for personal use and in stacks which are free, provided this copyright and conditions of use are included. They may not be used for commercial or profit-making purposes, or in Shareware, without permission.</span></text>
  855.     </content>
  856.     <name></name>
  857.     <script></script>
  858. </card>
  859.  
  860.  
  861. card_2782.xml
  862. <?xml version="1.0" encoding="utf-8" ?>
  863. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  864. <card>
  865.     <id>2782</id>
  866.     <filler1>0</filler1>
  867.     <cantDelete> <false /> </cantDelete>
  868.     <showPict> <true /> </showPict>
  869.     <dontSearch> <false /> </dontSearch>
  870.     <owner>4644</owner>
  871.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  872.     <part>
  873.         <id>1</id>
  874.         <type>button</type>
  875.         <visible> <true /> </visible>
  876.         <reserved5> 0 </reserved5>
  877.         <reserved4> 0 </reserved4>
  878.         <reserved3> 0 </reserved3>
  879.         <reserved2> 0 </reserved2>
  880.         <reserved1> 0 </reserved1>
  881.         <enabled> <true /> </enabled>
  882.         <rect>
  883.             <left>158</left>
  884.             <top>89</top>
  885.             <right>258</right>
  886.             <bottom>111</bottom>
  887.         </rect>
  888.         <style>roundrect</style>
  889.         <showName> <true /> </showName>
  890.         <highlight> <false /> </highlight>
  891.         <autoHighlight> <true /> </autoHighlight>
  892.         <sharedHighlight> <true /> </sharedHighlight>
  893.         <family>0</family>
  894.         <titleWidth>0</titleWidth>
  895.         <icon>0</icon>
  896.         <textAlign>center</textAlign>
  897.         <font>Chicago</font>
  898.         <textSize>12</textSize>
  899.         <textStyle>plain</textStyle>
  900.         <name>Some MusicΓǪ</name>
  901.         <script>on mouseUpplayTuneend mouseUp</script>
  902.     </part>
  903.     <content>
  904.         <layer>background</layer>
  905.         <id>3</id>
  906.         <text>Page 1 of 20</text>
  907.     </content>
  908.     <content>
  909.         <layer>background</layer>
  910.         <id>9</id>
  911.         <text>Introduction</text>
  912.     </content>
  913.     <content>
  914.         <layer>background</layer>
  915.         <id>2</id>
  916.         <text><span class="style1">n HyperCard buttons are attached to either a card or a background, they cannot be attached directly to text. However, a button can be placed on top of text, for example:(Type </span><span class="style12">Γîÿ-.</span><span class="style1"> if you get bored.) Unfortunately there are two problems with this method:ΓÇó┬á┬áAs the button is not attached to the text but laid on top of it,┬á┬á┬á┬áif the text is edited the button will not move. This means that┬á┬á┬á┬áafter every change the button needs to be repositioned, if the┬á┬á┬á┬ábuttons are being used for footnote references or so called ΓÇ£hot┬á┬á┬á┬álinksΓÇ¥ this can be a </span><span class="style2">lot</span><span class="style1"> of work.ΓÇó┬á┬áThe second problem should now be apparent; if the text the┬á┬á┬á┬ábutton is laid upon is scrollable, then as the text is scrolled the┬á┬á┬á┬ábutton stays put.The standard HyperText solution to this problem is to use </span><span class="style2">sticky</span><span class="style1"> buttons, that is buttons which are attached to, or part of, the text and move with it. Unfortunately HyperCard does not support sticky buttons, making it less useful for HyperText applications. This paper describes a method for extending HyperCard to include sticky buttons by combining the new </span><span class="style2">active</span><span class="style1"> </span><span class="style2">text</span><span class="style1"> support of version 2 with a specially written font.</span></text>
  917.     </content>
  918.     <content>
  919.         <layer>background</layer>
  920.         <id>12</id>
  921.         <highlight> <true /> </highlight>
  922.     </content>
  923.     <name></name>
  924.     <script></script>
  925. </card>
  926.  
  927.  
  928. card_5541.xml
  929. <?xml version="1.0" encoding="utf-8" ?>
  930. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  931. <card>
  932.     <id>5541</id>
  933.     <filler1>0</filler1>
  934.     <bitmap>BMAP_4238.pbm</bitmap>
  935.     <cantDelete> <false /> </cantDelete>
  936.     <showPict> <true /> </showPict>
  937.     <dontSearch> <false /> </dontSearch>
  938.     <owner>5304</owner>
  939.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  940.     <part>
  941.         <id>7</id>
  942.         <type>button</type>
  943.         <visible> <true /> </visible>
  944.         <reserved5> 0 </reserved5>
  945.         <reserved4> 0 </reserved4>
  946.         <reserved3> 0 </reserved3>
  947.         <reserved2> 0 </reserved2>
  948.         <reserved1> 0 </reserved1>
  949.         <enabled> <true /> </enabled>
  950.         <rect>
  951.             <left>150</left>
  952.             <top>180</top>
  953.             <right>186</right>
  954.             <bottom>210</bottom>
  955.         </rect>
  956.         <style>transparent</style>
  957.         <showName> <false /> </showName>
  958.         <highlight> <false /> </highlight>
  959.         <autoHighlight> <false /> </autoHighlight>
  960.         <sharedHighlight> <true /> </sharedHighlight>
  961.         <family>0</family>
  962.         <titleWidth>0</titleWidth>
  963.         <icon>1011</icon>
  964.         <textAlign>center</textAlign>
  965.         <font>Chicago</font>
  966.         <textSize>12</textSize>
  967.         <textStyle>plain</textStyle>
  968.         <name>Home</name>
  969.         <script>on mouseUpgo homeend mouseUp</script>
  970.     </part>
  971.     <part>
  972.         <id>8</id>
  973.         <type>button</type>
  974.         <visible> <true /> </visible>
  975.         <reserved5> 0 </reserved5>
  976.         <reserved4> 0 </reserved4>
  977.         <reserved3> 0 </reserved3>
  978.         <reserved2> 0 </reserved2>
  979.         <reserved1> 0 </reserved1>
  980.         <enabled> <true /> </enabled>
  981.         <rect>
  982.             <left>191</left>
  983.             <top>180</top>
  984.             <right>227</right>
  985.             <bottom>210</bottom>
  986.         </rect>
  987.         <style>transparent</style>
  988.         <showName> <false /> </showName>
  989.         <highlight> <false /> </highlight>
  990.         <autoHighlight> <false /> </autoHighlight>
  991.         <sharedHighlight> <true /> </sharedHighlight>
  992.         <family>0</family>
  993.         <titleWidth>0</titleWidth>
  994.         <icon>28023</icon>
  995.         <textAlign>center</textAlign>
  996.         <font>Chicago</font>
  997.         <textSize>12</textSize>
  998.         <textStyle>plain</textStyle>
  999.         <name>Intro</name>
  1000.         <script>on mouseUpvisual effect dissolve to grayvisual effect dissolvego to stack "Start Here"end mouseUp</script>
  1001.     </part>
  1002.     <part>
  1003.         <id>9</id>
  1004.         <type>button</type>
  1005.         <visible> <true /> </visible>
  1006.         <reserved5> 0 </reserved5>
  1007.         <reserved4> 0 </reserved4>
  1008.         <reserved3> 0 </reserved3>
  1009.         <reserved2> 0 </reserved2>
  1010.         <reserved1> 0 </reserved1>
  1011.         <enabled> <true /> </enabled>
  1012.         <rect>
  1013.             <left>232</left>
  1014.             <top>180</top>
  1015.             <right>268</right>
  1016.             <bottom>210</bottom>
  1017.         </rect>
  1018.         <style>transparent</style>
  1019.         <showName> <false /> </showName>
  1020.         <highlight> <false /> </highlight>
  1021.         <autoHighlight> <false /> </autoHighlight>
  1022.         <sharedHighlight> <true /> </sharedHighlight>
  1023.         <family>0</family>
  1024.         <titleWidth>0</titleWidth>
  1025.         <icon>26425</icon>
  1026.         <textAlign>center</textAlign>
  1027.         <font>Chicago</font>
  1028.         <textSize>12</textSize>
  1029.         <textStyle>plain</textStyle>
  1030.         <name>Next</name>
  1031.         <script>on mouseDownset lockMessages to truelock screenput the number of the next cd into tgsend closeCard to this cdgo next cdif the hilite of bg btn "Scroll" then set the style of fld "Text" to scrollingelse set the style of fld "Text" to opaqueunlock screen with wipe leftset lockMessages to falsesend openCard to cd tgend mouseDown</script>
  1032.     </part>
  1033.     <part>
  1034.         <id>11</id>
  1035.         <type>button</type>
  1036.         <visible> <true /> </visible>
  1037.         <reserved5> 0 </reserved5>
  1038.         <reserved4> 0 </reserved4>
  1039.         <reserved3> 0 </reserved3>
  1040.         <reserved2> 0 </reserved2>
  1041.         <reserved1> 0 </reserved1>
  1042.         <enabled> <true /> </enabled>
  1043.         <rect>
  1044.             <left>390</left>
  1045.             <top>187</top>
  1046.             <right>416</right>
  1047.             <bottom>211</bottom>
  1048.         </rect>
  1049.         <style>opaque</style>
  1050.         <showName> <false /> </showName>
  1051.         <highlight> <false /> </highlight>
  1052.         <autoHighlight> <false /> </autoHighlight>
  1053.         <sharedHighlight> <true /> </sharedHighlight>
  1054.         <family>0</family>
  1055.         <titleWidth>0</titleWidth>
  1056.         <icon>25002</icon>
  1057.         <textAlign>center</textAlign>
  1058.         <font>Chicago</font>
  1059.         <textSize>12</textSize>
  1060.         <textStyle>plain</textStyle>
  1061.         <name>New Button</name>
  1062.         <script>on mouseUpvisual effect barn door opengo cd "Help"end mouseUp</script>
  1063.     </part>
  1064.     <content>
  1065.         <layer>background</layer>
  1066.         <id>2</id>
  1067.         <text>Sticky Buttons</text>
  1068.     </content>
  1069.     <content>
  1070.         <layer>background</layer>
  1071.         <id>3</id>
  1072.         <text>Nigel Perry, November 1990</text>
  1073.     </content>
  1074.     <content>
  1075.         <layer>background</layer>
  1076.         <id>5</id>
  1077.         <text><span class="style7">bstract</span><span class="style1"></span><span class="style2">Sticky</span><span class="style1"> buttons are buttons which are attached to text, usually scrollable, and move with it. Sticky buttons are very useful in HyperText documents, but unfortunately HyperCard does not support them. This paper describes a method for implementing sticky buttons in HyperCard by combining the use of </span><span class="style2">grouped</span><span class="style1"> text, a new feature in HyperCard 2, and special fonts.</span></text>
  1078.     </content>
  1079.     <content>
  1080.         <layer>background</layer>
  1081.         <id>6</id>
  1082.         <text>Nigel Perry, Dept of Computing, Imperial College, 180 Queens Gate, London SW7, UKEmail: np@doc.ic.ac.uk</text>
  1083.     </content>
  1084.     <name></name>
  1085.     <script>on arrowKey whichif which is "Right" thensend mouseUp to btn "Next"elseif which is not "Left" thenpass arrowKeyend ifend ifend arrowKey</script>
  1086. </card>
  1087.  
  1088.  
  1089.